package mode.states18;

public class Shopping {

    public static final Event ORDER_STATE = new Order();
    public static final Event PAY_STATE = new Pay();
    public static final Event RECEIVE_STATE = new Receive();
    public static final Event EVALUATE_STATE = new Evaluate();
    public static final Event FINISH_STATE = new Finish();
    public static final Event REFUND = new Refund();
    //状态记录，默认进入下单状态
    private Event event = ORDER_STATE;

    public Event getEvent() {
        return event;
    }
    public void setEvent(Event event) {
        this.event = event;
    }

    public void startOrder(Boolean isConfirm){
        event.order(this,isConfirm);
    }
    public void startPay(Boolean isConfirm){
        event.pay(this,isConfirm);
    }
    public void startReceive(Boolean isConfirm){
        event.receive(this,isConfirm);
    }
    public void startEvaluate(Boolean isConfirm){
        event.evaluate(this,isConfirm);
    }
    public void startFinish(Boolean isConfirm){
        event.finish(this,isConfirm);
    }
    public void startRefund(Boolean isConfirm){
        event.refund(this,isConfirm);
    }

}
